#ifndef MYOBJECTASSHAREDPTR_H
#define MYOBJECTASSHAREDPTR_H

///////////////////////////////////////////////////////////////////////////////
//
// MyObjectAsSharedPtr.h
//
///////////////////////////////////////////////////////////////////////////////
//
// Author:            Jan Maes
// Created:           Sunday, June 15, 2008
// Responsibilities:  Objects of class MyObjectAsSharedPtr can only be
//                    created using the HandleFactory::HandleFactory::Create
//                    member functions. As a result we get a
//                    boost::shared_ptr<MyObjectAsSharedPtr> object as 
//                    output.
//
///////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////
// Includes
///////////////////////////////////////////////////////////////////////////////

#include <HandleFactory/HandleFactory.h>

#include <boost/smart_ptr.hpp>

///////////////////////////////////////////////////////////////////////////////
// MyObjectAsSharedPtr
///////////////////////////////////////////////////////////////////////////////

class MyObjectAsSharedPtr : public HandleFactory::HandleFactory<MyObjectAsSharedPtr, boost::shared_ptr<MyObjectAsSharedPtr>>
  {
  private:
    friend class HandleFactory::HandleFactory<MyObjectAsSharedPtr, boost::shared_ptr<MyObjectAsSharedPtr>>;

    MyObjectAsSharedPtr() : m_double(0.0) 
      {
      }

    explicit MyObjectAsSharedPtr(double i_double)
      {
      m_double = i_double;
      }

    ~MyObjectAsSharedPtr()
      {
      }

  public:
  
    double GetDouble() const 
      {
      return m_double;
      }

  private:

    double m_double;

  };

#endif